#include "pch.h"
#include "DrawCellManager.h"

namespace mini
{
	CDrawCellManager::CDrawCellManager()
	{

	}

	CDrawCellManager::~CDrawCellManager()
	{
		for (auto& item : mContains)
		{
			for( auto& child : item.second )
			{
				SafeDelete(child);
			}
		}
	}

	void CDrawCellManager::releaseDrawCell(DrawCell* pCell)
	{
		if (nullptr != pCell)
		{
			int type = pCell->getType();
			mContains[type].push_back(pCell);
		}
	}

}
